<?php 
if (!isset($_SESSION)) session_start();

header("Content-Type: text/html; charset=utf-8", true);
					
if(isset($_SESSION['UsuarioID']))
{
echo '<div class="head-car">
	<div>
	<span>Bem-Vindo,</span>';
echo "<span>".$_SESSION['UsuarioNome']."</span>";
	
echo '<span>!</span>
	</div>
	<div class="links">
	<a class="car-link" href=';
if($_SESSION['UsuarioNivel'] == 3)
	echo "'MinhaTelaAdm.php'";
else
	echo "'MinhaTelaCliente.php'";
echo'>Minha Conta</a>
	<span>-</span>
	<a class="car-link" href="acaoLogOff.php">Sair</a>
	</div>';

if($_SESSION['UsuarioNivel'] != 3){
	echo "<div class=\"link-car\">";
	echo "<a class=\"car-icon car-link\" href=\"MeuCarrinho.php\">Ver carrinho</a>";
	echo "</div>";
}

echo '</div>';
}
else {	
echo
	'<div class="head-login">
	<a class="login-link" href="cadastroCliente.php">cadastre-se</a>
	
	<form id="form-head" action="acaoValidacaoLogin.php" method="post">
	<div class="line">
	<label class="label-head" for="label-login">Login:</label>
	<input class="input-head" type="text" id="label-login" name="login">
	</div>
	<div class="line">
	<label class="label-head" for="label-password">Senha:</label>
	<input class="input-head" type="password" id="label-password" name="password">
	</div>
	<input class="submit-login" type="submit" value="Entrar" />
	</form>
	</div>';
}
?>